package com.dxy.dxyuser.controller;

import com.dxy.dxyuser.DO.UserInfo;
import com.dxy.dxyuser.annotation.Authorization;
import com.dxy.dxyuser.annotation.CurrentUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/inter")
@Slf4j
public class HelloController {

    @Authorization
    @RequestMapping(value = "/hello")
    public String hello (@CurrentUser UserInfo userInfo) {
        log.info("========="+userInfo.toString());
        return "Hello World";
    }

    @RequestMapping(value = "/test")
    public String hello () {
        return "Hello Test";
    }





}
